package cn.iocoder.yudao.module.call.dal.mysql.ivrintentionlabel;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.call.dal.dataobject.ivrintentionlabel.IvrIntentionLabelDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.call.controller.admin.ivrintentionlabel.vo.*;

/**
 * 用户意向标签 Mapper
 *
 * @author 数创万维
 */
@Mapper
public interface IvrIntentionLabelMapper extends BaseMapperX<IvrIntentionLabelDO> {

    default PageResult<IvrIntentionLabelDO> selectPage(IvrIntentionLabelPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<IvrIntentionLabelDO>()
                .eqIfPresent(IvrIntentionLabelDO::getLabelType, reqVO.getLabelType())
                .eqIfPresent(IvrIntentionLabelDO::getMatchingNum, reqVO.getMatchingNum())
                .eqIfPresent(IvrIntentionLabelDO::getFlowId, reqVO.getFlowId())
                .betweenIfPresent(IvrIntentionLabelDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(IvrIntentionLabelDO::getId));
    }

}